package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"news/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	beego.Router("/useradd", &controllers.UserController{}, "post:UserAdd")
	beego.Router("/login", &controllers.UserController{}, "post:Login")
	beego.Router("/add", &controllers.NewsController{}, "post:Add")
	beego.Router("/upload", &controllers.NewsController{}, "post:Upload")
	beego.Router("/list", &controllers.NewsController{}, "get:List")
	beego.Router("/info", &controllers.NewsController{}, "get:Info")
	beego.Router("/del", &controllers.NewsController{}, "get:Del")
	beego.Router("/lop", &controllers.NewsController{}, "get:Lop")
	beego.Router("/comment", &controllers.NewsController{}, "post:Comment")
	beego.Router("/collection", &controllers.NewsController{}, "post:Collection")
	beego.Router("/collList", &controllers.NewsController{}, "get:CollList")
	beego.Router("/rank", &controllers.NewsController{}, "get:Rank")
}
